<?php
        @session_start();
        include "cnn/valida_sesion.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Galeria</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/mm_training.css" type="text/css" />
<style type="text/css">
<!--
.Estilo1 {
	font-size: 36px;
	font-weight: bold;
}
-->
</style>
<script src="js/Funciones_Administrador.js" type="text/javascript"></script>

</head>
<body bgcolor="#64748B">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr bgcolor="#26354A">
	<td width="15" nowrap="nowrap"><img src="Imagenes/mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
	<td height="70" colspan="2" class="logo" nowrap="nowrap">D E C I D E <span class="Estilo1">T</span><span class="tagline">| DEFINE TU FUTURO</span></td>
	<td width="100%">&nbsp;</td>
	</tr>

	<tr bgcolor="#FF6600">
	<td colspan="4"><img src="Imagenes/mm_spacer.gif" alt="" width="1" height="4" border="0" /></td>
	</tr>

	<tr bgcolor="#D3DCE6">
	<td colspan="4"><img src="Imagenes/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	<tr bgcolor="#FFCC00">
	<td width="15" nowrap="nowrap">&nbsp;</td>
	<td width="705" colspan="2" height="24">
	<table width="782" border="0" cellpadding="0" cellspacing="0" id="navigation">
        <tr>
          <td class="navText" align="center" nowrap="nowrap"><a href="Encuestas_Administrador.php">ENCUESTAS</a></td>
          <td class="navText" align="center" nowrap="nowrap"><a style="background-color: #FF6600;color: #FFFFFF" href="#">GALERIA</a></td>
          <td class="navText" align="center" nowrap="nowrap"><a href="Personal_Perfil.php">PERSONAL</a></td>
          <td class="navText" align="center" nowrap="nowrap"><a href="salir.php">SALIR</a></td>
        </tr>
      </table>	</td>
	<td width="100%">&nbsp;</td>
	</tr>

	<tr bgcolor="#D3DCE6">
	<td colspan="4"><img src="Imagenes/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	<tr bgcolor="#FF6600">
	<td colspan="4"><img src="Imagenes/mm_spacer.gif" alt="" width="1" height="4" border="0" /></td>
	</tr>

	<tr bgcolor="#D3DCE6">
	<td colspan="4"><img src="Imagenes/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
	</tr>

	<tr bgcolor="#D3DCE6">
	<td width="15" valign="top">&nbsp;</td>
	<td width="35"><img src="Imagenes/mm_spacer.gif" alt="" width="35" height="1" border="0" /></td>
	<td width="710" valign="top"><br />
	&nbsp;<br />
	<table border="0" cellspacing="0" cellpadding="2" width="610">
        <tr>
          <td colspan="7" class="pageName">Galeria</td>
        </tr>
        <tr>
            <form name="myform" id="myform" method="post" action="Agrega_Galeria.php" enctype="multipart/form-data">
          <td colspan="7" >Agregar...<input type="file" name="imagen" size="50" maxlength="20" />
              <br/>Descripcion...<input type="text" id="desc" name="desc" size="100"/>
              <input type="submit" id="Guar" name="Guar" value="Enviar"/>
          </td>
          </form>
        </tr>




          <?php

                        $cnn = cnn2();
                        $query = 'call galeria_fotos()';
                        //echo "<br>Consulta".$query;
                        $sql=mysqli_query($cnn,$query) or die ("Error:".mysqli_error($link));
                        $n=0;
                        echo "<tr>";
                        while($res=mysqli_fetch_object($sql)){
                            if($n%4==0)
                                echo "</tr><tr>";
                                echo "<td style=\"border:blue 1px solid\"><a href=# onClick=\"popup_vista_h('Imagen_Galeria.php?Imagen=".$res->id."')\"><img src=Imagen_Galeria.php?Imagen=".$res->id." width='237' height='147' >
                                    <br><h3>".$res->Descripcion."</h3></a><a href='Elimina_Imagen?imag=".$res->id."'>Eliminar... <img src='Imagenes/Elimina.JPG' width='15' height='15'></a></td>";
                                $n++;
                        }
                        mysqli_close($cnn);
                        echo "</tr>";

                ?>




		<tr>
			<td colspan="7">&nbsp;</td>
		</tr>
      </table>
	 <br />	</td>
	<td>&nbsp;</td>
	</tr>

	<tr>
	<td width="15">&nbsp;<br />
	&nbsp;<br />	</td>
    <td width="35">&nbsp;</td>
    <td width="710">&nbsp;</td>
	<td width="100%">&nbsp;</td>
  </tr>
</table>
</body>
</html>


